import 'package:flutter/material.dart';
import 'package:flutter_massage/common_lib/index.dart';
import 'package:flutter_massage/common_lib/ui/common_component.dart';
import 'package:flutter_massage/pages/model/bean.dart';
import 'package:flutter_massage/pages/preject/detail/project_detail_page.dart';
import 'package:flutter_massage/pages/technician/technician_list/technician_list_logic.dart';
import 'package:flutter_massage/values/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class TechnicianListPage extends GetView<TechnicianListLogic> {
  const TechnicianListPage(this.technicianList, {super.key});

  final List<TechnicianBean> technicianList;

  @override
  Widget build(BuildContext context) {
    return BaseScaffold(
      titleStr: '技师列表',
      scaffoldBackgroundColor: AppColors.grayF8,
      child: GetBuilder<TechnicianListLogic>(
        assignId: true,
        init: TechnicianListLogic(technicianList),
        builder: (logic) {
          return ListView.separated(
            padding: EdgeInsets.all(12.w),
            itemCount: technicianList.length,
            separatorBuilder: (BuildContext context, int index) => CommonMargin.height(12.w),
            itemBuilder: (BuildContext context, int index) {
              return CommonTechnicianItem(technicianList[index]);
            },
          );
        },
      ),
    );
  }
}
